package jdl.databaseObjects;

public class DbField extends DbObject {
	private DbType dbType;
	private FieldCollection fieldCollection;

	public DbField(String name, DbType dbType) {
		super(name);
		this.dbType = dbType;
	}

	public DbType getDbType() {
		return dbType;
	}

	void setFieldCollection(FieldCollection fieldCollection) {
		this.fieldCollection = fieldCollection;
	}

	public FieldCollection getFieldCollection() {
		return fieldCollection;
	}

	public void changeDbType(DbType dbType) {
		if (dbType == null)
			throw new IllegalArgumentException("dbType is null.");
		this.dbType = dbType;
	}
}
